// Need to provide a declaration/definition of alloca()
#if defined(__FreeBSD__) || defined(__NetBSD__)
#include <stdlib.h>
#else
#include <alloca.h>
#endif

#include <stdint.h>

// Type definitions for the specific machine
typedef int32_t mp_int_t; // must be pointer size
typedef uint32_t mp_uint_t; // must be pointer size
typedef long mp_off_t;

#define MICROPY_GC_SPLIT_HEAP (1)
#define MICROPY_GC_SPLIT_HEAP_AUTO (1)

#define MICROPY_MPHALPORT_H "mp_flipper_halport.h"

#define MICROPY_MIN_USE_CORTEX_CPU (1)
#define MICROPY_MIN_USE_STM32_MCU (1)

#define MICROPY_HW_BOARD_NAME "Flipper Zero"
#define MICROPY_HW_MCU_NAME "STM32WB55RG"

#define MICROPY_CONFIG_ROM_LEVEL (MICROPY_CONFIG_ROM_LEVEL_CORE_FEATURES)

#define MICROPY_EMIT_THUMB_ARMV7M (0)
#define MICROPY_EMIT_INLINE_THUMB_FLOAT (0)

#define MICROPY_PERSISTENT_CODE_LOAD (0)
#define MICROPY_PERSISTENT_CODE_SAVE (0)
#define MICROPY_PERSISTENT_CODE_SAVE_FILE (0)

#define MICROPY_ENABLE_COMPILER (1)
#define MICROPY_ENABLE_GC (1)
#define MICROPY_PY_GC_COLLECT_RETVAL (0)
#define MICROPY_ENABLE_PYSTACK (0)
#define MICROPY_STACK_CHECK (0)
#define MICROPY_ALLOC_PATH_MAX (128)

#define MICROPY_ENABLE_FINALISER (1)

#define MICROPY_ERROR_REPORTING (MICROPY_ERROR_REPORTING_NONE)

#define MICROPY_GC_STACK_ENTRY_TYPE uint32_t

#define MICROPY_PY___FILE__ (1)
#define MICROPY_ENABLE_EXTERNAL_IMPORT (1)
#define MICROPY_READER_VFS (1)

#define MICROPY_ENABLE_VM_ABORT (0)

#define MICROPY_PY_ERRNO (0)
#define MICROPY_USE_INTERNAL_ERRNO (0)
#define MICROPY_PY_ERRNO_ERRORCODE (0)

#define MICROPY_PY_TIME (1)
#define MICROPY_PY_TIME_TIME_TIME_NS (1)

#define MICROPY_PY_RANDOM (1)
#define MICROPY_PY_RANDOM_EXTRA_FUNCS (1)

#define MICROPY_PY_RANDOM_SEED_INIT_FUNC (mp_flipper_seed_init())

#define MICROPY_LONGINT_IMPL (MICROPY_LONGINT_IMPL_LONGLONG)

#define MICROPY_FLOAT_IMPL (MICROPY_FLOAT_IMPL_FLOAT)

#define MICROPY_ENABLE_SOURCE_LINE (0)
#define MICROPY_ENABLE_DOC_STRING (0)

#define MICROPY_HELPER_REPL (1)
#define MICROPY_REPL_INFO (0)
#define MICROPY_REPL_EMACS_KEYS (0)
#define MICROPY_REPL_EMACS_WORDS_MOVE (0)
#define MICROPY_REPL_EMACS_EXTRA_WORDS_MOVE (0)
#define MICROPY_REPL_AUTO_INDENT (0)
#define MICROPY_REPL_EVENT_DRIVEN (0)
#define MICROPY_READLINE_HISTORY_SIZE (0)

#define MICROPY_CPYTHON_COMPAT (1)
#define MICROPY_FULL_CHECKS (0)
#define MICROPY_BUILTIN_METHOD_CHECK_SELF_ARG (0)

#define MICROPY_MODULE_FROZEN_MPY (0)

#define MICROPY_PY_CMATH (0)
#define MICROPY_PY_BUILTINS_COMPLEX (0)
#define MICROPY_MULTIPLE_INHERITANCE (0)
#define MICROPY_MODULE_GETATTR (0)
#define MICROPY_PY_FUNCTION_ATTRS (1)
#define MICROPY_PY_DESCRIPTORS (0)
#define MICROPY_PY_ASYNC_AWAIT (0)
#define MICROPY_PY_ASSIGN_EXPR (0)
#define MICROPY_PY_GENERATOR_PEND_THROW (0)
#define MICROPY_PY_BUILTINS_BYTES_HEX (0)
#define MICROPY_PY_BUILTINS_STR_UNICODE (0)
#define MICROPY_PY_BUILTINS_STR_CENTER (0)
#define MICROPY_PY_BUILTINS_STR_COUNT (0)
#define MICROPY_PY_BUILTINS_STR_OP_MODULO (1)
#define MICROPY_PY_BUILTINS_STR_PARTITION (0)
#define MICROPY_PY_BUILTINS_STR_SPLITLINES (0)
#define MICROPY_PY_BUILTINS_BYTEARRAY (0)
#define MICROPY_PY_BUILTINS_DICT_FROMKEYS (0)
#define MICROPY_PY_BUILTINS_MEMORYVIEW (0)
#define MICROPY_PY_BUILTINS_SET (1)
#define MICROPY_PY_BUILTINS_SLICE (0)
#define MICROPY_PY_BUILTINS_SLICE_ATTRS (0)
#define MICROPY_PY_BUILTINS_SLICE_INDICES (0)
#define MICROPY_PY_BUILTINS_FROZENSET (0)
#define MICROPY_PY_BUILTINS_PROPERTY (0)
#define MICROPY_PY_BUILTINS_RANGE_ATTRS (0)
#define MICROPY_PY_BUILTINS_RANGE_BINOP (0)
#define MICROPY_PY_BUILTINS_NEXT2 (0)
#define MICROPY_PY_BUILTINS_ROUND_INT (0)
#define MICROPY_PY_ALL_SPECIAL_METHODS (0)
#define MICROPY_PY_REVERSE_SPECIAL_METHODS (0)
#define MICROPY_PY_BUILTINS_ENUMERATE (0)
#define MICROPY_PY_BUILTINS_COMPILE (0)
#define MICROPY_PY_BUILTINS_EVAL_EXEC (0)
#define MICROPY_PY_BUILTINS_EXECFILE (0)
#define MICROPY_PY_BUILTINS_FILTER (1)
#define MICROPY_PY_BUILTINS_REVERSED (1)
#define MICROPY_PY_BUILTINS_NOTIMPLEMENTED (0)
#define MICROPY_PY_BUILTINS_INPUT (0)
#define MICROPY_PY_BUILTINS_MIN_MAX (1)
#define MICROPY_PY_BUILTINS_POW3 (0)
#define MICROPY_PY_BUILTINS_HELP (0)
#define MICROPY_PY_MICROPYTHON (0)
#define MICROPY_PY_MICROPYTHON_MEM_INFO (0)
#define MICROPY_PY_MICROPYTHON_STACK_USE (0)
#define MICROPY_PY_MICROPYTHON_HEAP_LOCKED (0)
#define MICROPY_PY_ARRAY (0)
#define MICROPY_PY_ARRAY_SLICE_ASSIGN (0)
#define MICROPY_PY_ATTRTUPLE (0)
#define MICROPY_PY_COLLECTIONS (0)
#define MICROPY_PY_STRUCT (0)
#define MICROPY_PY_GC (0)
#define MICROPY_PY_SYS (0)
#define MICROPY_PY_SYS_MODULES (0)
#define MICROPY_PY_SELECT_SELECT (0)
#define MICROPY_PY_SYS_EXIT (0)
#define MICROPY_PY_RE (0)
#define MICROPY_PY_CRYPTOLIB (0)
#define MICROPY_PY_VFS (0)
#define MICROPY_ENABLE_SCHEDULER (1)
#define MICROPY_MODULE_BUILTIN_INIT (1)

#define MICROPY_PY_MATH (0)

#define MICROPY_PY_IO (0)
#define MICROPY_PY_IO_BYTESIO (0)

#define MICROPY_PY_JSON (0)
#define MICROPY_PY_JSON_SEPARATORS (0)

#define MICROPY_COMP_CONST_FOLDING (0)
#define MICROPY_COMP_CONST_TUPLE (0)
#define MICROPY_COMP_CONST_LITERAL (0)
#define MICROPY_COMP_CONST (0)
#define MICROPY_COMP_DOUBLE_TUPLE_ASSIGN (0)

#define MICROPY_USE_INTERNAL_PRINTF (0)